#include "dialogcode.h"
#include "ui_dialogcode.h"

extern QString code;

DialogCode::DialogCode(QWidget *parent,QString a) :
    QDialog(parent),
    ui(new Ui::DialogCode)
{
    ui->setupUi(this);
    connect(ui->submit,SIGNAL(clicked()),this,SLOT(cc()));
    ui->textBrowser->setHtml(tr("<img src=\"")+a+tr("/code.gif\">"));
}

DialogCode::~DialogCode()
{
    delete ui;
}

void DialogCode::cc()
{
    code=ui->codebox->text();
    this->close();
}
